3.3.20 \(\int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx\) [220]

Optimal. Leaf size=37 \[ \frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \]

[Out]

2*arcsinh(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))*a^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {3886, 221} \begin {gather*} \frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[Sec[c + d*x]]*Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(2*Sqrt[a]*ArcSinh[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d

Rule 221

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt[a])]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 3886

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2*(a/(b
*f))*Sqrt[a*(d/b)], Subst[Int[1/Sqrt[1 + x^2/a], x], x, b*(Cot[e + f*x]/Sqrt[a + b*Csc[e + f*x]])], x] /; Free
Q[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && GtQ[a*(d/b), 0]

Rubi steps

\begin {align*} \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx &=-\frac {2 \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {2 \sqrt {a} \sinh ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 54, normalized size = 1.46 \begin {gather*} -\frac {2 \text {ArcSin}\left (\sqrt {\sec (c+d x)}\right ) \sqrt {a (1+\sec (c+d x))} \tan \left (\frac {1}{2} (c+d x)\right )}{d \sqrt {1-\sec (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Sec[c + d*x]]*Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(-2*ArcSin[Sqrt[Sec[c + d*x]]]*Sqrt[a*(1 + Sec[c + d*x])]*Tan[(c + d*x)/2])/(d*Sqrt[1 - Sec[c + d*x]])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(149\) vs. \(2(31)=62\).
time = 0.14, size = 150, normalized size = 4.05

method result size
default \(\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \cos \left (d x +c \right ) \left (\arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )+\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )-\arctan \left (\frac {\sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (1+\cos \left (d x +c \right )-\sin \left (d x +c \right )\right ) \sqrt {2}}{4}\right )\right ) \sqrt {-\frac {2}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )-1\right ) \sqrt {2}}{2 d \sin \left (d x +c \right )^{2}}\) \(150\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^(1/2)*(a+a*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2/d*(a*(1+cos(d*x+c))/cos(d*x+c))^(1/2)*(1/cos(d*x+c))^(1/2)*cos(d*x+c)*(arctan(1/4*(-2/(1+cos(d*x+c)))^(1/2
)*(1+cos(d*x+c)+sin(d*x+c))*2^(1/2))-arctan(1/4*(-2/(1+cos(d*x+c)))^(1/2)*(1+cos(d*x+c)-sin(d*x+c))*2^(1/2)))*
(-2/(1+cos(d*x+c)))^(1/2)/sin(d*x+c)^2*(cos(d*x+c)^2-1)*2^(1/2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 241 vs. \(2 (31) = 62\).
time = 0.57, size = 241, normalized size = 6.51 \begin {gather*} \frac {\sqrt {a} {\left (\log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) + \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right )\right )}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^(1/2)*(a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(a)*(log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 + 2*sqrt(2)*cos(1/2*d*x + 1/2*c) + 2*sqrt
(2)*sin(1/2*d*x + 1/2*c) + 2) - log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 + 2*sqrt(2)*cos(1/2*d*
x + 1/2*c) - 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2) + log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 - 2
*sqrt(2)*cos(1/2*d*x + 1/2*c) + 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2) - log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2
*d*x + 1/2*c)^2 - 2*sqrt(2)*cos(1/2*d*x + 1/2*c) - 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 77 vs. \(2 (31) = 62\).
time = 2.28, size = 189, normalized size = 5.11 \begin {gather*} \left [\frac {\sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - \frac {4 \, {\left (\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{2 \, d}, \frac {\sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^(1/2)*(a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(a)*log((a*cos(d*x + c)^3 - 7*a*cos(d*x + c)^2 - 4*(cos(d*x + c)^2 - 2*cos(d*x + c))*sqrt(a)*sqrt((a*
cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c)/sqrt(cos(d*x + c)) + 8*a)/(cos(d*x + c)^3 + cos(d*x + c)^2))/d, s
qrt(-a)*arctan(2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(cos(d*x + c))*sin(d*x + c)/(a*cos(d*x +
 c)^2 - a*cos(d*x + c) - 2*a))/d]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \sqrt {\sec {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**(1/2)*(a+a*sec(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a*(sec(c + d*x) + 1))*sqrt(sec(c + d*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^(1/2)*(a+a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a*sec(d*x + c) + a)*sqrt(sec(d*x + c)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))^(1/2)*(1/cos(c + d*x))^(1/2),x)

[Out]

int((a + a/cos(c + d*x))^(1/2)*(1/cos(c + d*x))^(1/2), x)

________________________________________________________________________________________